from selenium import webdriver
from scrapy.selector import Selector

browser = webdriver.Chrome(executable_path=r"C:/Users/Administrator/Downloads/chromedriver_win32/chromedriver.exe")

# 测试的入口url
browser.get("https://www.zhihu.com/signin")

browser.find_element_by_css_selector("div.SignFlow-accountInput.Input-wrapper > input").send_keys("15213379869")
browser.find_element_by_css_selector("div.SignFlow-password > div > div.Input-wrapper > input").send_keys("belief417@zhihu.com")
browser.find_element_by_css_selector("div.Login-content > form > button").click()


# print(browser.page_source) # 页面信息
t_selector = Selector(text=browser.page_source)
